package com.kristin.controller;

import com.kristin.feign.UserApis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestWebController
 * @Description TODO
 * @Author Kristin
 * @Date 2021/04/15 16:37:45
 * @Version 1.0.0
 */
@RestController
@RequestMapping("/test")
public class TestWebController {

    @Autowired
    private UserApis userApis;

    @Value("${aa.bb}")
    private String value;

    @RequestMapping(value = "/getTest", method = RequestMethod.GET)
    public String getTest() {
        return userApis.get("通过web调用的");
    }

    @RequestMapping(value = "/getEnv", method = RequestMethod.GET)
    public String getEnv() {
        return value;
    }

}
